<%--
  Created by IntelliJ IDEA.
  User: humeng
  Date: 2022/10/26
  Time: 10:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>v</title>
</head>
<body>
<%
  request.setCharacterEncoding("utf-8");

  //姓名
  String username = request.getParameter("username");
  System.out.println(username);
  //学号
  String number = request.getParameter("number");
  //密码
  String password = request.getParameter("password");
  if ("".equals(username)||"".equals(number)||"".equals(password)){
    out.println("<script>alert(\"表单不能为空\");location = \"login.jsp\"</script>");
    return;
  }
    session.setAttribute("username",username);
    session.setAttribute("number",number);
    session.setAttribute("password",password);
    response.sendRedirect("home.jsp");
%>
</body>
</html>
